<template>
  <div class="footer">
     <span>我是Footer组件</span>
     <Grandson></Grandson>
  </div>
</template>

<script>
import Grandson from './Grandson.vue';
export default {
  name: '',
  components:{
     Grandson
  },
  mounted() {
    //事件源(Vue类的一个实例)绑定一个自定义事件
    //绑定一个自定义事件,money
    this.$bus.$on('money',(qian)=>{
       console.log(qian);
    })
  },
}
</script>

<style scoped>
  .footer{
      width: 400px;
      height: 200px;
      margin: 10px auto;
      background: red;
  }
</style>
